home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Nov 90 / MacApp.Tech$ 11⁄23⁄90 / 2388-OP PROG USING FSOPEN-Nov90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.4 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item    0585614                         17-Nov-90        09:59PST
  2.  
  3. From:   D5997                           Mgmt Sys Cons, Gregory Frazier,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. cc:     D5997                           Mgmt Sys Cons, Gregory Frazier,PRT
  8.  
  9. Sub:    OP PROG USING FSOPEN FUNC.
  10.  
  11. HELP!
  12.  
  13. I am a new user to the MacApp world.  I would like to compile the following
  14. simple program just to get familiar with Object Programming:
  15.  
  16. PROGRAM Test1;
  17.  
  18. USES
  19.    MemTypes, ObjIntf;
  20.  
  21. TYPE
  22.    TFileProc=OBJECT(TOBJECT)
  23.    FUNCTION TFileProc.FSOpen ( fileName:     Str255;
  24.                   cRefNum:     INTEGER;
  25.                   refNum:       INTEGER): OSErr: FORWARD;
  26.    END;
  27.  
  28. VAR
  29.    aFileProc:  TFileProc;
  30.    OSErr:  OSErr;
  31.  
  32. FUNCTION TFileProc.FSOpen (fileName:   Str255;
  33.                             cRefNum:    INTEGER;
  34.                             refNum:     INTEGER): OSErr;
  35.  
  36.  
  37. BEGIN
  38.    NEW(aFileProc);
  39. END.
  40.  
  41. I am encountering the following PASCAL compile errors:
  42.  
  43.     •   Error 114 - Unsatisfied forward reference for OSErr;
  44.     •   Error 102 - Identifier not declared, I think this error is in reference
  45. to the method FSOpen;
  46.     •   Error 117 - Function result type is inconsistent with original
  47. specification.
  48.  
  49. Note that FSOpen is a ToolBox function.  I would like to compile the function
  50. into a program written in OOP.
  51.  
  52. My link is D5997
  53.  
  54. I can be reached at 313-972-3414.  Call collect.
  55.  
  56.